testmodelbutton: Fix wrongly overridding MB child
authorDaniel Boles <dboles.src@gmail.com>
Sun, 8 Apr 2018 17:31:03 +0000 (18:31 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Sun, 8 Apr 2018 17:48:16 +0000 (18:48 +0100)
I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...

tests/testmodelbutton.c

index c7268e48c32593c75ab1ab27dc83f7cea4ae858a..b1b6151724cd460bc85a4ec8bd32f94aa0864b77 100644 (file)
@@ -45,8 +45,8 @@ on_application_activate (GApplication *gapplication,
 
   model_button = g_object_new (GTK_TYPE_MODEL_BUTTON,
                                "action-name", "app.beep",
+                               "text", "It’s-a-me! ModelButton",
                                NULL);
-  gtk_button_set_label (GTK_BUTTON (model_button), "It’s-a-me! ModelButton");
   gtk_container_add (GTK_CONTAINER (box), model_button);
 
   widget = gtk_combo_box_text_new ();